Use form instead of AuthType Basic (pop-up windows)

Use form instead of AuthType Basic (pop-up windows)

am 21.01.2010 17:37:55 von joanmanel

--0015174c1cc22fe6a1047daf53f7
Content-Type: text/plain; charset=ISO-8859-1

Hello, this is my first message to this list and I am also a bit new to
mod_perl.
My question is simple, in all the documentation I have found about mod_perl
and auth (like practical mod perl, or writing apache modules in perl and c)
they are always using AuthType Basic, so when the users tries to acess some
protected content, a pop up windows will appear to ask for name/pass.

What I want to do is to use a formulary instead of that pop-up window. As
far as I know looking at AuthCookie, for example, there they define
"AuthType Sample::AuthCookie" and they also define a login.pl and different
configs in the conf files.

I want to know the different steps to define and use a form instead of
AuthType Basic.

Thank you very much,
Juan Manuel Parrilla

--0015174c1cc22fe6a1047daf53f7
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello, this is my first message to this list and I am also a bit new to mod=
_perl.
My question is simple, in all the documentation I have found abou=
t mod_perl and auth (like practical mod perl, or writing apache modules in =
perl and c) they are always using AuthType Basic, so when the users tries t=
o acess some protected content, a pop up windows will appear to ask for nam=
e/pass.


What I want to do is to use a formulary instead of that pop-up window. =
As far as I know looking at AuthCookie, for example, there they define &quo=
t;AuthType Sample::AuthCookie" and they also define a //login.pl">login.pl and different configs in the conf files.


I want to know the different steps to define and use a form instead of =
AuthType Basic.

Thank you very much,
Juan Manuel Parrilla


--0015174c1cc22fe6a1047daf53f7--

Re: Use form instead of AuthType Basic (pop-up windows)

am 21.01.2010 17:53:18 von joanmanel

--00032555937a31a475047daf8ad7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Thank you for your answer, but I would like to use Authz and Authen like
AuthCookie is doing. (And I think Apache::Session is not doing so).
What I do not now is: how to use a form instead of "AuthType Basic"?

Juan Manuel Parrilla

2010/1/21 David Romero

> Hi,
>
> Look at Apache::Session module, that module is easy to use and you can
> store any kind of data in the session object like the "login data"
>
> Just store in the session object the login form results where necessary.
>
>
> 2010/1/21 Juan Manuel Parrilla Guti=E9rrez
>
> Hello, this is my first message to this list and I am also a bit new to
>> mod_perl.
>> My question is simple, in all the documentation I have found about
>> mod_perl and auth (like practical mod perl, or writing apache modules in
>> perl and c) they are always using AuthType Basic, so when the users trie=
s to
>> acess some protected content, a pop up windows will appear to ask for
>> name/pass.
>>
>> What I want to do is to use a formulary instead of that pop-up window. A=
s
>> far as I know looking at AuthCookie, for example, there they define
>> "AuthType Sample::AuthCookie" and they also define a login.pl and
>> different configs in the conf files.
>>
>> I want to know the different steps to define and use a form instead of
>> AuthType Basic.
>>
>> Thank you very much,
>> Juan Manuel Parrilla
>>
>
>
>
> --
> David Romero
> -----------------------------------------------------------
>
>

--00032555937a31a475047daf8ad7
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Thank you for your answer, but I would like to use Authz and Authen like Au=
thCookie is doing. (And I think Apache::Session is not doing so).
What I=
do not now is: how to use a form instead of "AuthType Basic"? >

Juan Manuel Parrilla

2010/1/21 David =
Romero <romdav@gma=
il.com
>

left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left=
: 1ex;">
Hi,

Look at Apache::Session module, that module is easy =
to use and you can store any kind of data in the session object like the &q=
uot;login data"

Just store in the session object the=
login form results where necessary.




2010/1/21 Juan Manuel Pa=
rrilla Guti=E9rrez < com" target=3D"_blank">joanmanel@gmail.com>
iv class=3D"h5">

04, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello, this is my first message to this list and I am also a bit new to mod=
_perl.
My question is simple, in all the documentation I have found abou=
t mod_perl and auth (like practical mod perl, or writing apache modules in =
perl and c) they are always using AuthType Basic, so when the users tries t=
o acess some protected content, a pop up windows will appear to ask for nam=
e/pass.




What I want to do is to use a formulary instead of that pop-up window. =
As far as I know looking at AuthCookie, for example, there they define &quo=
t;AuthType Sample::AuthCookie" and they also define a //login.pl" target=3D"_blank">login.pl and different configs in the con=
f files.




I want to know the different steps to define and use a form instead of =
AuthType Basic.

Thank you very much,
Juan=
Manuel Parrilla




--
Davi=
d Romero
-----------------------------------------------------------
=






--00032555937a31a475047daf8ad7--

Re: Use form instead of AuthType Basic (pop-up windows)

am 21.01.2010 18:06:27 von aw

Juan Manuel Parrilla Gutiérrez wrote:
> Hello, this is my first message to this list and I am also a bit new to
> mod_perl.
> My question is simple, in all the documentation I have found about mod_perl
> and auth (like practical mod perl, or writing apache modules in perl and c)
> they are always using AuthType Basic, so when the users tries to acess some
> protected content, a pop up windows will appear to ask for name/pass.
>
> What I want to do is to use a formulary instead of that pop-up window. As
> far as I know looking at AuthCookie, for example, there they define
> "AuthType Sample::AuthCookie" and they also define a login.pl and different
> configs in the conf files.
>
> I want to know the different steps to define and use a form instead of
> AuthType Basic.
>
Have a look here :
http://cpan.uwinnipeg.ca/htdocs/Apache-AuthCookie/Apache2/Au thCookie.html
and scroll to the section
THE LOGIN SCRIPT

If you install that module, it comes along with examples.
AAA is tricky, and maybe not the easiest way to start playing with
mod_perl. But this documentation is well-done, and should get you
started, if you follow it carefully.

Re: Use form instead of AuthType Basic (pop-up windows)

am 21.01.2010 18:25:37 von joanmanel

--00151747884ecf0323047daffd59
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello, I am sorry if I didnt explain me properly.
What I want to know is understand how use a formulary instead of AuthType
Basic. I know there are several modules that are doing this, but it is not
about using one, it is about understanding how.

I am doing my own Auth module (just to learn about it and mod_perl) and I
would like to use a form instead of pop up window, and using CGI is not an
option because I want to use Authz and Authen handlers.

What I need are the basic steps to move from AuthType Basic to use a form.

Thank you very much for all your answers,
Juan Manuel Parrilla Gutierrez

2010/1/21 Andr=E9 Warnier

> Juan Manuel Parrilla Guti=E9rrez wrote:
>
>> Hello, this is my first message to this list and I am also a bit new to
>> mod_perl.
>> My question is simple, in all the documentation I have found about
>> mod_perl
>> and auth (like practical mod perl, or writing apache modules in perl and
>> c)
>> they are always using AuthType Basic, so when the users tries to acess
>> some
>> protected content, a pop up windows will appear to ask for name/pass.
>>
>> What I want to do is to use a formulary instead of that pop-up window. A=
s
>> far as I know looking at AuthCookie, for example, there they define
>> "AuthType Sample::AuthCookie" and they also define a login.pl and
>> different
>> configs in the conf files.
>>
>> I want to know the different steps to define and use a form instead of
>> AuthType Basic.
>>
>> Have a look here :
> http://cpan.uwinnipeg.ca/htdocs/Apache-AuthCookie/Apache2/Au thCookie.html
> and scroll to the section
> THE LOGIN SCRIPT
>
> If you install that module, it comes along with examples.
> AAA is tricky, and maybe not the easiest way to start playing with
> mod_perl. But this documentation is well-done, and should get you starte=
d,
> if you follow it carefully.
>
>

--00151747884ecf0323047daffd59
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello, I am sorry if I didnt explain me properly.
What I want to know is=
understand how use a formulary instead of AuthType Basic. I know there are=
several modules that are doing this, but it is not about using one, it is =
about understanding how.


I am doing my own Auth module (just to learn about it and mod_perl) and=
I would like to use a form instead of pop up window, and using CGI is not =
an option because I want to use Authz and Authen handlers.

What I ne=
ed are the basic steps to move from AuthType Basic to use a form.


Thank you very much for all your answers,
Juan Manuel Parrilla Gutie=
rrez

2010/1/21 Andr=E9 Warnier =3D"ltr"><><=
br>
4, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Juan Manuel Parrilla Guti=E9rrez wrote:

204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello, this is my first message to this list and I am also a bit new to

mod_perl.

My question is simple, in all the documentation I have found about mod_perl=


and auth (like practical mod perl, or writing apache modules in perl and c)=


they are always using AuthType Basic, so when the users tries to acess some=


protected content, a pop up windows will appear to ask for name/pass.



What I want to do is to use a formulary instead of that pop-up window. As r>
far as I know looking at AuthCookie, for example, there they define

"AuthType Sample::AuthCookie" and they also define a ttp://login.pl" target=3D"_blank">login.pl and different

configs in the conf files.



I want to know the different steps to define and use a form instead of

AuthType Basic.




Have a look here :

okie.html" target=3D"_blank">http://cpan.uwinnipeg.ca/htdocs/Apache-Aut hCoo=
kie/Apache2/AuthCookie.html


and scroll to the section

THE LOGIN SCRIPT



If you install that module, it comes along with examples.

AAA is tricky, and maybe not the easiest way to start playing with mod_perl=
.. =A0But this documentation is well-done, and should get you started, if yo=
u follow it carefully.






--00151747884ecf0323047daffd59--

Re: Use form instead of AuthType Basic (pop-up windows)

am 21.01.2010 18:39:26 von Ryan Gies

This is a multi-part message in MIME format.
--------------050804090006050407040205
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

On 1/21/2010 12:25 PM, Juan Manuel Parrilla Gutiérrez wrote:
> Hello, I am sorry if I didnt explain me properly.

Apache2::AuthCookie is what you are looking for. Read through the
source code, understand what it does and why and you will be able to
write your own. No, you cannot use an html form to input credentials
into the clients browser, i.e., replace the pop-up dialog. Hence the
need for an entire access and authentication system.

> Have a look here :
>
> http://cpan.uwinnipeg.ca/htdocs/Apache-AuthCookie/Apache2/Au thCookie.html
> and scroll to the section
> THE LOGIN SCRIPT
>
> If you install that module, it comes along with examples.
> AAA is tricky, and maybe not the easiest way to start playing with
> mod_perl. But this documentation is well-done, and should get you
> started, if you follow it carefully.
>
>

--------------050804090006050407040205
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit




http-equiv="Content-Type">


On 1/21/2010 12:25 PM, Juan Manuel Parrilla Gutiérrez wrote:
cite="mid:c762bdc01001210925w3735334ckcaff86d360510f79@mail. gmail.com"
type="cite">Hello, I am sorry if I didnt explain me properly.


Apache2::AuthCookie is what you are looking for.  Read through the
source code, understand what it does and why and you will be able to
write your own. No, you cannot use an html form to input credentials
into the clients browser, i.e., replace the pop-up dialog.  Hence the
need for an entire access and authentication system.



cite="mid:c762bdc01001210925w3735334ckcaff86d360510f79@mail. gmail.com"
type="cite">Have a look here :


style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> moz-do-not-send="true"
href="http://cpan.uwinnipeg.ca/htdocs/Apache-AuthCookie/Apac he2/AuthCookie.html"
target="_blank">http://cpan.uwinnipeg.ca/htdocs/Apache-AuthC ookie/Apache2/AuthCookie.html

and scroll to the section

THE LOGIN SCRIPT



If you install that module, it comes along with examples.

AAA is tricky, and maybe not the easiest way to start playing with
mod_perl.  But this documentation is well-done, and should get you
started, if you follow it carefully.











--------------050804090006050407040205--

Re: Use form instead of AuthType Basic (pop-up windows)

am 21.01.2010 18:40:03 von joanmanel

--00032555f9ca665114047db031a5
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Thank you for this example but it is talking about how to define the Authz
and Authen handlers, it is asuming that you are using AuthType Basic, " Whe=
n
Apache sends the HTTP header with this code, the browser will normally pop
up a dialog box that prompts the user for login information."

That is just what I want to change, instead of using a pop dialog, the
brower should send the user to a form.

Juan Manuel Parrilla Gutierrez

El 21 de enero de 2010 18:31, Morad IGMIR escribi=
=F3:

> http://perl.apache.org/docs/2.0/user/handlers/http.html#Perl AuthenHandle=
r
>
>
>
> this should help
>
>
>
> *De :* Juan Manuel Parrilla Guti=E9rrez [mailto:joanmanel@gmail.com]
> *Envoy=E9 :* jeudi 21 janvier 2010 18:26
> *=C0 :* mod_perl list
> *Objet :* Re: Use form instead of AuthType Basic (pop-up windows)
>
>
>
> Hello, I am sorry if I didnt explain me properly.
> What I want to know is understand how use a formulary instead of AuthType
> Basic. I know there are several modules that are doing this, but it is no=
t
> about using one, it is about understanding how.
>
> I am doing my own Auth module (just to learn about it and mod_perl) and I
> would like to use a form instead of pop up window, and using CGI is not a=
n
> option because I want to use Authz and Authen handlers.
>
> What I need are the basic steps to move from AuthType Basic to use a form=
..
>
> Thank you very much for all your answers,
> Juan Manuel Parrilla Gutierrez
>
> 2010/1/21 Andr=E9 Warnier
>
> Juan Manuel Parrilla Guti=E9rrez wrote:
>
> Hello, this is my first message to this list and I am also a bit new to
> mod_perl.
> My question is simple, in all the documentation I have found about mod_pe=
rl
> and auth (like practical mod perl, or writing apache modules in perl and =
c)
> they are always using AuthType Basic, so when the users tries to acess so=
me
> protected content, a pop up windows will appear to ask for name/pass.
>
> What I want to do is to use a formulary instead of that pop-up window. As
> far as I know looking at AuthCookie, for example, there they define
> "AuthType Sample::AuthCookie" and they also define a login.pl and
> different
> configs in the conf files.
>
> I want to know the different steps to define and use a form instead of
> AuthType Basic.
>
> Have a look here :
> http://cpan.uwinnipeg.ca/htdocs/Apache-AuthCookie/Apache2/Au thCookie.html
> and scroll to the section
> THE LOGIN SCRIPT
>
> If you install that module, it comes along with examples.
> AAA is tricky, and maybe not the easiest way to start playing with
> mod_perl. But this documentation is well-done, and should get you starte=
d,
> if you follow it carefully.
>
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.730 / Virus Database: 271.1.1/2635 - Release Date: 01/21/10
> 08:34:00
>

--00032555f9ca665114047db031a5
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Thank you for this example but it is talking about how to define the Authz =
and Authen handlers, it is asuming that you are using AuthType Basic, "=
; When Apache sends the HTTP header
with this code, the browser will normally pop up a dialog box that
prompts the user for login information."

That is just what I wa=
nt to change, instead of using a pop dialog, the brower should send the use=
r to a form.

Juan Manuel Parrilla Gutierrez

il_quote">
El 21 de enero de 2010 18:31, Morad IGMIR < mailto:sysadmin@alliancemca.com">sysadmin@alliancemca.com> es=
cribi=F3:
lid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">













lers/http.html#PerlAuthenHandler" target=3D"_blank">http://perl.apache.org/=
docs/2.0/user/handlers/http.html#PerlAuthenHandler



=A0



this should help r: rgb(31, 73, 125);">



25);">=A0



3) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium=
; padding: 3pt 0cm 0cm;">

De=A0: > Juan Manuel
Parrilla Guti=E9rrez [mailto: =3D"_blank">joanmanel@gmail.com]

Envoyé : jeudi 21 janvier 2010 18:26

À : mod_perl list

Objet=A0: Re: Use form instead of AuthType Basic (pop-up windows) pan>





=A0



Hello, I am sorry if =
I didnt
explain me properly.

What I want to know is understand how use a formulary instead of AuthType
Basic. I know there are several modules that are doing this, but it is not
about using one, it is about understanding how.



I am doing my own Auth module (just to learn about it and mod_perl) and I w=
ould
like to use a form instead of pop up window, and using CGI is not an option
because I want to use Authz and Authen handlers.



What I need are the basic steps to move from AuthType Basic to use a form.<=
br>


Thank you very much for all your answers,

Juan Manuel Parrilla Gutierrez





2010/1/21 Andr=E9 Warnier < ce-sa.com" target=3D"_blank">aw@ice-sa.com>



Juan Manuel Parrilla Guti=E9rrez wrote:



Hello, this is my fir=
st message
to this list and I am also a bit new to

mod_perl.

My question is simple, in all the documentation I have found about mod_perl=


and auth (like practical mod perl, or writing apache modules in perl and c)=


they are always using AuthType Basic, so when the users tries to acess some=


protected content, a pop up windows will appear to ask for name/pass.



What I want to do is to use a formulary instead of that pop-up window. As r>
far as I know looking at AuthCookie, for example, there they define

"AuthType Sample::AuthCookie" and they also define a ttp://login.pl" target=3D"_blank">login.pl and different

configs in the conf files.



I want to know the different steps to define and use a form instead of

AuthType Basic.



Have a look here : >
okie.html" target=3D"_blank">http://cpan.uwinnipeg.ca/htdocs/Apache-Aut hCoo=
kie/Apache2/AuthCookie.html


and scroll to the section

THE LOGIN SCRIPT



If you install that module, it comes along with examples.

AAA is tricky, and maybe not the easiest way to start playing with mod_perl=
..
=A0But this documentation is well-done, and should get you started, if you
follow it carefully.





=A0



No virus
found in this incoming message.

Checked by AVG - www.avg.c=
om


Version: 9.0.730 / Virus Database: 271.1.1/2635 - Release Date: 01/21/10
08:34:00











--00032555f9ca665114047db031a5--

RE: Use form instead of AuthType Basic (pop-up windows)

am 21.01.2010 19:15:33 von dihnen

--_000_0C4F9AE61E425F4F8C6912AF90E9A9E9C682655FEXSEA19Bantam az_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I happen to have just finished debugging my latest authen/authz cookie-base=
d authentication module last night, so this is *really* fresh in my head.

So right now you're using AuthType basic. Change that to something else sp=
ecific to your module. The basic auth will no longer respond.

Program an authentication handler (point to with PerlAuthenHandler directiv=
e). It returns Apache2::Const::DECLINED if the ->auth_type doesn't match y=
our custom type. Authen handlers set the ->user of the requestrec object (=
probably by reading and validating a cookie in this case). If authorizatio=
n is required for the request and you didn't set a username, you should pro=
bably return Apache2::Const::FORBIDDEN. If it succeeded or it doesn't matt=
er, you can return Apache2::Const::OK;

Program an authorization handler. (point to with PerlAuthzHandler directiv=
e). This use the Apache2::Access::requires method to get a list of your au=
thentication requirements from the auth config in apache's config file (lik=
e Require valid-user). And Apache2::Access::satisfies to determine how you=
interpret the list of requirements.

If you want to use a straight login page, If Authorization fails, set error=
header 'Location' to the location of your login script and return Apache2:=
:Const::REDIRECT from the handler.

If you want to use an error document, If Authorization fails, return Apache=
2::Const::AUTH_REQUIRED or Apache2::Const::FORBIDDEN from the handler. (co=
nfigure ErrorDocument 401 or 403 respectively)

If authorization succeeds, simply return Apache2::Const::OK.

I also have handlers functions for LOGIN and LOGOUT which set and clear the=
auth cookie. That's different though - Authen/Authz is the part where you=
decide if the user is recognized and is allowed to access, which is what y=
ou asked about.

David



From: Juan Manuel Parrilla Guti=E9rrez [mailto:joanmanel@gmail.com]
Sent: Thursday, January 21, 2010 9:26 AM
To: mod_perl list
Subject: Re: Use form instead of AuthType Basic (pop-up windows)

Hello, I am sorry if I didnt explain me properly.
What I want to know is understand how use a formulary instead of AuthType B=
asic. I know there are several modules that are doing this, but it is not a=
bout using one, it is about understanding how.

I am doing my own Auth module (just to learn about it and mod_perl) and I w=
ould like to use a form instead of pop up window, and using CGI is not an o=
ption because I want to use Authz and Authen handlers.

What I need are the basic steps to move from AuthType Basic to use a form.

Thank you very much for all your answers,
Juan Manuel Parrilla Gutierrez
2010/1/21 Andr=E9 Warnier >
Juan Manuel Parrilla Guti=E9rrez wrote:
Hello, this is my first message to this list and I am also a bit new to
mod_perl.
My question is simple, in all the documentation I have found about mod_perl
and auth (like practical mod perl, or writing apache modules in perl and c)
they are always using AuthType Basic, so when the users tries to acess some
protected content, a pop up windows will appear to ask for name/pass.

What I want to do is to use a formulary instead of that pop-up window. As
far as I know looking at AuthCookie, for example, there they define
"AuthType Sample::AuthCookie" and they also define a login.pl pl> and different
configs in the conf files.

I want to know the different steps to define and use a form instead of
AuthType Basic.
Have a look here :
http://cpan.uwinnipeg.ca/htdocs/Apache-AuthCookie/Apache2/Au thCookie.html
and scroll to the section
THE LOGIN SCRIPT

If you install that module, it comes along with examples.
AAA is tricky, and maybe not the easiest way to start playing with mod_perl=
.. But this documentation is well-done, and should get you started, if you =
follow it carefully.


--_000_0C4F9AE61E425F4F8C6912AF90E9A9E9C682655FEXSEA19Bantam az_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:x=3D"urn:schemas-microsoft-com:office:excel" xmlns:p=3D"urn:schemas-m=
icrosoft-com:office:powerpoint" xmlns:a=3D"urn:schemas-microsoft-com:office=
:access" xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s=3D"=
uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs=3D"urn:schemas-microsof=
t-com:rowset" xmlns:z=3D"#RowsetSchema" xmlns:b=3D"urn:schemas-microsoft-co=
m:office:publisher" xmlns:ss=3D"urn:schemas-microsoft-com:office:spreadshee=
t" xmlns:c=3D"urn:schemas-microsoft-com:office:component:spread sheet" xmlns=
:odc=3D"urn:schemas-microsoft-com:office:odc" xmlns:oa=3D"urn:schemas-micro=
soft-com:office:activation" xmlns:html=3D"http://www.w3.org/TR/REC-html40" =
xmlns:q=3D"http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc=3D"http://m=
icrosoft.com/officenet/conferencing" xmlns:D=3D"DAV:" xmlns:Repl=3D"http://=
schemas.microsoft.com/repl/" xmlns:mt=3D"http://schemas.microsoft.com/share=
point/soap/meetings/" xmlns:x2=3D"http://schemas.microsoft.com/office/excel=
/2003/xml" xmlns:ppda=3D"http://www.passport.com/NameSpace.xsd" xmlns:ois=
=3D"http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir=3D"http://=
schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds=3D"http://www.w3=
..org/2000/09/xmldsig#" xmlns:dsp=3D"http://schemas.microsoft.com/sharepoint=
/dsp" xmlns:udc=3D"http://schemas.microsoft.com/data/udc" xmlns:xsd=3D"http=
://www.w3.org/2001/XMLSchema" xmlns:sub=3D"http://schemas.microsoft.com/sha=
repoint/soap/2002/1/alerts/" xmlns:ec=3D"http://www.w3.org/2001/04/xmlenc#"=
xmlns:sp=3D"http://schemas.microsoft.com/sharepoint/" xmlns:sps=3D"http://=
schemas.microsoft.com/sharepoint/soap/" xmlns:xsi=3D"http://www.w3.org/2001=
/XMLSchema-instance" xmlns:udcs=3D"http://schemas.microsoft.com/data/udc/so=
ap" xmlns:udcxf=3D"http://schemas.microsoft.com/data/udc/xmlfile " xmlns:udc=
p2p=3D"http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf=3D"http:/=
/schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss=3D"http://sche=
mas.microsoft.com/office/2006/digsig-setup" xmlns:dssi=3D"http://schemas.mi=
crosoft.com/office/2006/digsig" xmlns:mdssi=3D"http://schemas.openxmlformat=
s.org/package/2006/digital-signature" xmlns:mver=3D"http://schemas.openxmlf=
ormats.org/markup-compatibility/2006" xmlns:m=3D"http://schemas.microsoft.c=
om/office/2004/12/omml" xmlns:mrels=3D"http://schemas.openxmlformats.org/pa=
ckage/2006/relationships" xmlns:spwp=3D"http://microsoft.com/sharepoint/web=
partpages" xmlns:ex12t=3D"http://schemas.microsoft.com/exchange/service s/20=
06/types" xmlns:ex12m=3D"http://schemas.microsoft.com/exchange/service s/200=
6/messages" xmlns:pptsl=3D"http://schemas.microsoft.com/sharepoint/soap/ Sli=
deLibrary/" xmlns:spsl=3D"http://microsoft.com/webservices/SharePointPor tal=
Server/PublishedLinksService" xmlns:Z=3D"urn:schemas-microsoft-com:" xmlns:=
st=3D"" xmlns=3D"http://www.w3.org/TR/REC-html40">


>









"sans-serif";
color:#1F497D'>I happen to have just finished debugging my latest authen/au=
thz
cookie-based authentication module last night, so this is *really* f=
resh
in my head.



"sans-serif";
color:#1F497D'> 



"sans-serif";
color:#1F497D'>So right now you’re using AuthType basic.=A0 Change th=
at to
something else specific to your module.=A0 The basic auth will no longer re=
spond.



"sans-serif";
color:#1F497D'> 



"sans-serif";
color:#1F497D'>Program an authentication handler (point to with
PerlAuthenHandler directive).=A0 It returns Apache2::Const::DECLINED if the=
->auth_type
doesn’t match your custom type.=A0 Authen handlers set the ->user =
of the
requestrec object (probably by reading and validating a cookie in this case=
).=A0
If authorization is required for the request and you didn’t set a
username, you should probably return Apache2::Const::FORBIDDEN.=A0 If it
succeeded or it doesn’t matter, you can return Apache2::Const::OK; p>



"sans-serif";
color:#1F497D'> 



"sans-serif";
color:#1F497D'>Program an authorization handler.=A0 (point to with PerlAuth=
zHandler
directive).=A0 This use the Apache2::Access::requires method to get a list =
of
your authentication requirements from the auth config in apache’s con=
fig
file (like Require valid-user).=A0 And Apache2::Access::satisfies to determ=
ine
how you =A0interpret the list of requirements.



"sans-serif";
color:#1F497D'> 



"sans-serif";
color:#1F497D'>If you want to use a straight login page, If Authorization
fails, set error header ‘Location’ to the location of your logi=
n
script and return Apache2::Const::REDIRECT from the handler. an>



"sans-serif";
color:#1F497D'> 



"sans-serif";
color:#1F497D'>If you want to use an error document, If Authorization fails=
, return
Apache2::Const::AUTH_REQUIRED or Apache2::Const::FORBIDDEN from the handler=
..=A0
(configure ErrorDocument 401 or 403 respectively)



"sans-serif";
color:#1F497D'> 



"sans-serif";
color:#1F497D'>If authorization succeeds, simply return Apache2::Const::OK.=



"sans-serif";
color:#1F497D'> 



"sans-serif";
color:#1F497D'>I also have handlers functions for LOGIN and LOGOUT which se=
t
and clear the auth cookie.=A0 That’s different though – Authen/=
Authz
is the part where you decide if the user is recognized and is allowed to ac=
cess,
which is what you asked about.



"sans-serif";
color:#1F497D'> 



"sans-serif";
color:#1F497D'>David



"sans-serif";
color:#1F497D'> 



"sans-serif";
color:#1F497D'> 



"sans-serif";
color:#1F497D'> 



0in 0in'>

","sans-serif"'>From: style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"' > Juan Manuel
Parrilla Guti=E9rrez [mailto:joanmanel@gmail.com]

Sent: Thursday, January 21, 2010 9:26 AM

To: mod_perl list

Subject: Re: Use form instead of AuthType Basic (pop-up windows) >





 



Hello, I am sorry if I =
didnt
explain me properly.

What I want to know is understand how use a formulary instead of AuthType
Basic. I know there are several modules that are doing this, but it is not
about using one, it is about understanding how.



I am doing my own Auth module (just to learn about it and mod_perl) and I w=
ould
like to use a form instead of pop up window, and using CGI is not an option
because I want to use Authz and Authen handlers.



What I need are the basic steps to move from AuthType Basic to use a form.<=
br>


Thank you very much for all your answers,

Juan Manuel Parrilla Gutierrez





2010/1/21 Andr=E9 Warnier < -sa.com">aw@ice-sa.com>



Juan Manuel Parrilla Guti=E9rrez wrote:



Hello, this is my first=
message
to this list and I am also a bit new to

mod_perl.

My question is simple, in all the documentation I have found about mod_perl=


and auth (like practical mod perl, or writing apache modules in perl and c)=


they are always using AuthType Basic, so when the users tries to acess some=


protected content, a pop up windows will appear to ask for name/pass.



What I want to do is to use a formulary instead of that pop-up window. As r>
far as I know looking at AuthCookie, for example, there they define

"AuthType Sample::AuthCookie" and they also define a href=3D"http://login.pl" target=3D"_blank">login.pl and different

configs in the conf files.



I want to know the different steps to define and use a form instead of

AuthType Basic.



Have a look here :

href=3D"http://cpan.uwinnipeg.ca/htdocs/Apache-AuthCookie/Ap ache2/AuthCooki=
e.html"
target=3D"_blank">http://cpan.uwinnipeg.ca/htdocs/Apache-Aut hCookie/Apache2=
/AuthCookie.html

and scroll to the section

THE LOGIN SCRIPT



If you install that module, it comes along with examples.

AAA is tricky, and maybe not the easiest way to start playing with mod_perl=
..
 But this documentation is well-done, and should get you started, if y=
ou
follow it carefully.





 









--_000_0C4F9AE61E425F4F8C6912AF90E9A9E9C682655FEXSEA19Bantam az_--

Re: Use form instead of AuthType Basic (pop-up windows)

am 21.01.2010 19:20:34 von joanmanel

--00032555a4e6519bd3047db0c2c0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

Thank you for the information. I didnt know that what login and logout
scripts were doing was setting/clearing the cookie.

Juan Manuel Parrilla

El 21 de enero de 2010 19:15, Ihnen, David escribi=F3:

> I happen to have just finished debugging my latest authen/authz
> cookie-based authentication module last night, so this is **really** fres=
h
> in my head.
>
>
>
> So right now you=92re using AuthType basic. Change that to something els=
e
> specific to your module. The basic auth will no longer respond.
>
>
>
> Program an authentication handler (point to with PerlAuthenHandler
> directive). It returns Apache2::Const::DECLINED if the ->auth_type doesn=
=92t
> match your custom type. Authen handlers set the ->user of the requestrec
> object (probably by reading and validating a cookie in this case). If
> authorization is required for the request and you didn=92t set a username=
, you
> should probably return Apache2::Const::FORBIDDEN. If it succeeded or it
> doesn=92t matter, you can return Apache2::Const::OK;
>
>
>
> Program an authorization handler. (point to with PerlAuthzHandler
> directive). This use the Apache2::Access::requires method to get a list =
of
> your authentication requirements from the auth config in apache=92s confi=
g
> file (like Require valid-user). And Apache2::Access::satisfies to determ=
ine
> how you interpret the list of requirements.
>
>
>
> If you want to use a straight login page, If Authorization fails, set err=
or
> header =91Location=92 to the location of your login script and return
> Apache2::Const::REDIRECT from the handler.
>
>
>
> If you want to use an error document, If Authorization fails, return
> Apache2::Const::AUTH_REQUIRED or Apache2::Const::FORBIDDEN from the
> handler. (configure ErrorDocument 401 or 403 respectively)
>
>
>
> If authorization succeeds, simply return Apache2::Const::OK.
>
>
>
> I also have handlers functions for LOGIN and LOGOUT which set and clear t=
he
> auth cookie. That=92s different though =96 Authen/Authz is the part wher=
e you
> decide if the user is recognized and is allowed to access, which is what =
you
> asked about.
>
>
>
> David
>
>
>
>
>
>
>
> *From:* Juan Manuel Parrilla Guti=E9rrez [mailto:joanmanel@gmail.com]
> *Sent:* Thursday, January 21, 2010 9:26 AM
> *To:* mod_perl list
> *Subject:* Re: Use form instead of AuthType Basic (pop-up windows)
>
>
>
> Hello, I am sorry if I didnt explain me properly.
> What I want to know is understand how use a formulary instead of AuthType
> Basic. I know there are several modules that are doing this, but it is no=
t
> about using one, it is about understanding how.
>
> I am doing my own Auth module (just to learn about it and mod_perl) and I
> would like to use a form instead of pop up window, and using CGI is not a=
n
> option because I want to use Authz and Authen handlers.
>
> What I need are the basic steps to move from AuthType Basic to use a form=
..
>
> Thank you very much for all your answers,
> Juan Manuel Parrilla Gutierrez
>
> 2010/1/21 Andr=E9 Warnier
>
> Juan Manuel Parrilla Guti=E9rrez wrote:
>
> Hello, this is my first message to this list and I am also a bit new to
> mod_perl.
> My question is simple, in all the documentation I have found about mod_pe=
rl
> and auth (like practical mod perl, or writing apache modules in perl and =
c)
> they are always using AuthType Basic, so when the users tries to acess so=
me
> protected content, a pop up windows will appear to ask for name/pass.
>
> What I want to do is to use a formulary instead of that pop-up window. As
> far as I know looking at AuthCookie, for example, there they define
> "AuthType Sample::AuthCookie" and they also define a login.pl and
> different
> configs in the conf files.
>
> I want to know the different steps to define and use a form instead of
> AuthType Basic.
>
> Have a look here :
> http://cpan.uwinnipeg.ca/htdocs/Apache-AuthCookie/Apache2/Au thCookie.html
> and scroll to the section
> THE LOGIN SCRIPT
>
> If you install that module, it comes along with examples.
> AAA is tricky, and maybe not the easiest way to start playing with
> mod_perl. But this documentation is well-done, and should get you starte=
d,
> if you follow it carefully.
>
>
>

--00032555a4e6519bd3047db0c2c0
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

Thank you for the information. I didnt know that what login and logout scri=
pts were doing was setting/clearing the cookie.

Juan Manuel Parrilla=


El 21 de enero de 2010 19:15, Ihnen, Dav=
id <dihnen@amazon=
..com
>
escribi=F3:

204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">












25);">I happen to have just finished debugging my latest authen/authz
cookie-based authentication module last night, so this is *really* f=
resh
in my head.



25);">=A0



25);">So right now you=92re using AuthType basic.=A0 Change that to
something else specific to your module.=A0 The basic auth will no longer re=
spond.



25);">=A0



25);">Program an authentication handler (point to with
PerlAuthenHandler directive).=A0 It returns Apache2::Const::DECLINED if the=
->auth_type
doesn=92t match your custom type.=A0 Authen handlers set the ->user of t=
he
requestrec object (probably by reading and validating a cookie in this case=
).=A0
If authorization is required for the request and you didn=92t set a
username, you should probably return Apache2::Const::FORBIDDEN.=A0 If it
succeeded or it doesn=92t matter, you can return Apache2::Const::OK;
=



25);">=A0



25);">Program an authorization handler.=A0 (point to with PerlAuthzHandler
directive).=A0 This use the Apache2::Access::requires method to get a list =
of
your authentication requirements from the auth config in apache=92s config
file (like Require valid-user).=A0 And Apache2::Access::satisfies to determ=
ine
how you =A0interpret the list of requirements.



25);">=A0



25);">If you want to use a straight login page, If Authorization
fails, set error header =91Location=92 to the location of your login
script and return Apache2::Const::REDIRECT from the handler.



25);">=A0



25);">If you want to use an error document, If Authorization fails, return
Apache2::Const::AUTH_REQUIRED or Apache2::Const::FORBIDDEN from the handler=
..=A0
(configure ErrorDocument 401 or 403 respectively)



25);">=A0



25);">If authorization succeeds, simply return Apache2::Const::OK. p>

25);">=A0



25);">I also have handlers functions for LOGIN and LOGOUT which set
and clear the auth cookie.=A0 That=92s different though =96 Authen/Authz
is the part where you decide if the user is recognized and is allowed to ac=
cess,
which is what you asked about.



25);">=A0



25);">David



25);">=A0



25);">=A0



25);">=A0



3) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium=
; padding: 3pt 0in 0in;">

From:=
Juan Manuel
Parrilla Guti=E9rrez [mailto: =3D"_blank">joanmanel@gmail.com]

Sent: Thursday, January 21, 2010 9:26 AM

To: mod_perl list

Subject: Re: Use form instead of AuthType Basic (pop-up windows) an>





=A0



Hello, I am sorry if =
I didnt
explain me properly.

What I want to know is understand how use a formulary instead of AuthType
Basic. I know there are several modules that are doing this, but it is not
about using one, it is about understanding how.



I am doing my own Auth module (just to learn about it and mod_perl) and I w=
ould
like to use a form instead of pop up window, and using CGI is not an option
because I want to use Authz and Authen handlers.



What I need are the basic steps to move from AuthType Basic to use a form.<=
br>


Thank you very much for all your answers,

Juan Manuel Parrilla Gutierrez





2010/1/21 Andr=E9 Warnier < ce-sa.com" target=3D"_blank">aw@ice-sa.com>



Juan Manuel Parrilla Guti=E9rrez wrote:



Hello, this is my fir=
st message
to this list and I am also a bit new to

mod_perl.

My question is simple, in all the documentation I have found about mod_perl=


and auth (like practical mod perl, or writing apache modules in perl and c)=


they are always using AuthType Basic, so when the users tries to acess some=


protected content, a pop up windows will appear to ask for name/pass.



What I want to do is to use a formulary instead of that pop-up window. As r>
far as I know looking at AuthCookie, for example, there they define

"AuthType Sample::AuthCookie" and they also define a ttp://login.pl" target=3D"_blank">login.pl and different

configs in the conf files.



I want to know the different steps to define and use a form instead of

AuthType Basic.



Have a look here : >
okie.html" target=3D"_blank">http://cpan.uwinnipeg.ca/htdocs/Apache-Aut hCoo=
kie/Apache2/AuthCookie.html


and scroll to the section

THE LOGIN SCRIPT



If you install that module, it comes along with examples.

AAA is tricky, and maybe not the easiest way to start playing with mod_perl=
..
=A0But this documentation is well-done, and should get you started, if you
follow it carefully.





=A0











--00032555a4e6519bd3047db0c2c0--

RE: Use form instead of AuthType Basic (pop-up windows)

am 21.01.2010 19:35:50 von dihnen

--_000_0C4F9AE61E425F4F8C6912AF90E9A9E9C68265C7EXSEA19Bantam az_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I suppose it is not obvious that when using login page authentication that =
you are responsible for the creation of the mechanism by which you identify=
the user?

I could point out that merely the fact you are utilizing a login form does =
not mean you HAVE to use cookies - it just has less ramifications than othe=
r possibilities.

That is, whether the request is

GET /index.html HTTP/1.1
Host: myserver.com
Cookie: AuthTicket=3Dusername-ABCDEFGHIJKLM

Or the request is

GET /username-ABCDEFGHIJKLM/index.html HTTP/1.1
Host: myserver.com

Your authorization handler can get the string 'username-ABCDEFGHIJKLM' and =
use it for the purposes of authentication/authorization. Just in the latte=
r case, you'll be adding a PerlMapToStorageHandler to map around the extra =
auth information in the url and still access the file!

(I've used this strategy of embedding auth tickets in urls for download and=
media links handled by external programs that won't have the cookie)

David


From: Juan Manuel Parrilla Guti=E9rrez [mailto:joanmanel@gmail.com]
Sent: Thursday, January 21, 2010 10:21 AM
To: Ihnen, David
Cc: mod_perl list
Subject: Re: Use form instead of AuthType Basic (pop-up windows)

Thank you for the information. I didnt know that what login and logout scri=
pts were doing was setting/clearing the cookie.

Juan Manuel Parrilla
El 21 de enero de 2010 19:15, Ihnen, David @amazon.com>> escribi=F3:
I happen to have just finished debugging my latest authen/authz cookie-base=
d authentication module last night, so this is *really* fresh in my head.

So right now you're using AuthType basic. Change that to something else sp=
ecific to your module. The basic auth will no longer respond.

Program an authentication handler (point to with PerlAuthenHandler directiv=
e). It returns Apache2::Const::DECLINED if the ->auth_type doesn't match y=
our custom type. Authen handlers set the ->user of the requestrec object (=
probably by reading and validating a cookie in this case). If authorizatio=
n is required for the request and you didn't set a username, you should pro=
bably return Apache2::Const::FORBIDDEN. If it succeeded or it doesn't matt=
er, you can return Apache2::Const::OK;

Program an authorization handler. (point to with PerlAuthzHandler directiv=
e). This use the Apache2::Access::requires method to get a list of your au=
thentication requirements from the auth config in apache's config file (lik=
e Require valid-user). And Apache2::Access::satisfies to determine how you=
interpret the list of requirements.

If you want to use a straight login page, If Authorization fails, set error=
header 'Location' to the location of your login script and return Apache2:=
:Const::REDIRECT from the handler.

If you want to use an error document, If Authorization fails, return Apache=
2::Const::AUTH_REQUIRED or Apache2::Const::FORBIDDEN from the handler. (co=
nfigure ErrorDocument 401 or 403 respectively)

If authorization succeeds, simply return Apache2::Const::OK.

I also have handlers functions for LOGIN and LOGOUT which set and clear the=
auth cookie. That's different though - Authen/Authz is the part where you=
decide if the user is recognized and is allowed to access, which is what y=
ou asked about.

David



From: Juan Manuel Parrilla Guti=E9rrez [mailto:joanmanel@gmail.com oanmanel@gmail.com>]
Sent: Thursday, January 21, 2010 9:26 AM
To: mod_perl list
Subject: Re: Use form instead of AuthType Basic (pop-up windows)

Hello, I am sorry if I didnt explain me properly.
What I want to know is understand how use a formulary instead of AuthType B=
asic. I know there are several modules that are doing this, but it is not a=
bout using one, it is about understanding how.

I am doing my own Auth module (just to learn about it and mod_perl) and I w=
ould like to use a form instead of pop up window, and using CGI is not an o=
ption because I want to use Authz and Authen handlers.

What I need are the basic steps to move from AuthType Basic to use a form.

Thank you very much for all your answers,
Juan Manuel Parrilla Gutierrez
2010/1/21 Andr=E9 Warnier >
Juan Manuel Parrilla Guti=E9rrez wrote:
Hello, this is my first message to this list and I am also a bit new to
mod_perl.
My question is simple, in all the documentation I have found about mod_perl
and auth (like practical mod perl, or writing apache modules in perl and c)
they are always using AuthType Basic, so when the users tries to acess some
protected content, a pop up windows will appear to ask for name/pass.

What I want to do is to use a formulary instead of that pop-up window. As
far as I know looking at AuthCookie, for example, there they define
"AuthType Sample::AuthCookie" and they also define a login.pl pl> and different
configs in the conf files.

I want to know the different steps to define and use a form instead of
AuthType Basic.
Have a look here :
http://cpan.uwinnipeg.ca/htdocs/Apache-AuthCookie/Apache2/Au thCookie.html
and scroll to the section
THE LOGIN SCRIPT

If you install that module, it comes along with examples.
AAA is tricky, and maybe not the easiest way to start playing with mod_perl=
.. But this documentation is well-done, and should get you started, if you =
follow it carefully.



--_000_0C4F9AE61E425F4F8C6912AF90E9A9E9C68265C7EXSEA19Bantam az_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

1">
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:x=3D"urn:schemas-microsoft-com:office:excel" xmlns:p=3D"urn:schemas-m=
icrosoft-com:office:powerpoint" xmlns:a=3D"urn:schemas-microsoft-com:office=
:access" xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s=3D"=
uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs=3D"urn:schemas-microsof=
t-com:rowset" xmlns:z=3D"#RowsetSchema" xmlns:b=3D"urn:schemas-microsoft-co=
m:office:publisher" xmlns:ss=3D"urn:schemas-microsoft-com:office:spreadshee=
t" xmlns:c=3D"urn:schemas-microsoft-com:office:component:spread sheet" xmlns=
:odc=3D"urn:schemas-microsoft-com:office:odc" xmlns:oa=3D"urn:schemas-micro=
soft-com:office:activation" xmlns:html=3D"http://www.w3.org/TR/REC-html40" =
xmlns:q=3D"http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc=3D"http://m=
icrosoft.com/officenet/conferencing" xmlns:D=3D"DAV:" xmlns:Repl=3D"http://=
schemas.microsoft.com/repl/" xmlns:mt=3D"http://schemas.microsoft.com/share=
point/soap/meetings/" xmlns:x2=3D"http://schemas.microsoft.com/office/excel=
/2003/xml" xmlns:ppda=3D"http://www.passport.com/NameSpace.xsd" xmlns:ois=
=3D"http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir=3D"http://=
schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds=3D"http://www.w3=
..org/2000/09/xmldsig#" xmlns:dsp=3D"http://schemas.microsoft.com/sharepoint=
/dsp" xmlns:udc=3D"http://schemas.microsoft.com/data/udc" xmlns:xsd=3D"http=
://www.w3.org/2001/XMLSchema" xmlns:sub=3D"http://schemas.microsoft.com/sha=
repoint/soap/2002/1/alerts/" xmlns:ec=3D"http://www.w3.org/2001/04/xmlenc#"=
xmlns:sp=3D"http://schemas.microsoft.com/sharepoint/" xmlns:sps=3D"http://=
schemas.microsoft.com/sharepoint/soap/" xmlns:xsi=3D"http://www.w3.org/2001=
/XMLSchema-instance" xmlns:udcs=3D"http://schemas.microsoft.com/data/udc/so=
ap" xmlns:udcxf=3D"http://schemas.microsoft.com/data/udc/xmlfile " xmlns:udc=
p2p=3D"http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf=3D"http:/=
/schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss=3D"http://sche=
mas.microsoft.com/office/2006/digsig-setup" xmlns:dssi=3D"http://schemas.mi=
crosoft.com/office/2006/digsig" xmlns:mdssi=3D"http://schemas.openxmlformat=
s.org/package/2006/digital-signature" xmlns:mver=3D"http://schemas.openxmlf=
ormats.org/markup-compatibility/2006" xmlns:m=3D"http://schemas.microsoft.c=
om/office/2004/12/omml" xmlns:mrels=3D"http://schemas.openxmlformats.org/pa=
ckage/2006/relationships" xmlns:spwp=3D"http://microsoft.com/sharepoint/web=
partpages" xmlns:ex12t=3D"http://schemas.microsoft.com/exchange/service s/20=
06/types" xmlns:ex12m=3D"http://schemas.microsoft.com/exchange/service s/200=
6/messages" xmlns:pptsl=3D"http://schemas.microsoft.com/sharepoint/soap/ Sli=
deLibrary/" xmlns:spsl=3D"http://microsoft.com/webservices/SharePointPor tal=
Server/PublishedLinksService" xmlns:Z=3D"urn:schemas-microsoft-com:" xmlns:=
st=3D"" xmlns=3D"http://www.w3.org/TR/REC-html40">












"sans-serif";
color:#1F497D'>I suppose it is not obvious that when using login page
authentication that you are responsible for the creation of the mechanism b=
y
which you identify the user?



"sans-serif";
color:#1F497D'> 



"sans-serif";
color:#1F497D'>I could point out that merely the fact you are utilizing a l=
ogin
form does not mean you HAVE to use cookies – it just has less ramific=
ations
than other possibilities.



"sans-serif";
color:#1F497D'> 



"sans-serif";
color:#1F497D'>That is, whether the request is



"sans-serif";
color:#1F497D'> 



"sans-serif";
color:#1F497D'>GET /index.html HTTP/1.1



"sans-serif";
color:#1F497D'>Host: myserver.com



"sans-serif";
color:#1F497D'>Cookie: AuthTicket=3Dusername-ABCDEFGHIJKLM >



"sans-serif";
color:#1F497D'> 



"sans-serif";
color:#1F497D'>Or the request is



"sans-serif";
color:#1F497D'> 



"sans-serif";
color:#1F497D'>GET /username-ABCDEFGHIJKLM/index.html HTTP/1.1 span>



"sans-serif";
color:#1F497D'>Host: myserver.com



"sans-serif";
color:#1F497D'> 



"sans-serif";
color:#1F497D'>Your authorization handler can get the string ‘usernam=
e-ABCDEFGHIJKLM’
and use it for the purposes of authentication/authorization.=A0 Just in the
latter case, you’ll be adding a PerlMapToStorageHandler to map around=
the extra
auth information in the url and still access the file!
>

"sans-serif";
color:#1F497D'> 



"sans-serif";
color:#1F497D'>(I’ve used this strategy of embedding auth tickets in =
urls for
download and media links handled by external programs that won’t have=
the
cookie)



"sans-serif";
color:#1F497D'> 



"sans-serif";
color:#1F497D'>David



"sans-serif";
color:#1F497D'> 



"sans-serif";
color:#1F497D'> 



0in 0in'>

","sans-serif"'>From: style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"' > Juan Manuel
Parrilla Guti=E9rrez [mailto:joanmanel@gmail.com]

Sent: Thursday, January 21, 2010 10:21 AM

To: Ihnen, David

Cc: mod_perl list

Subject: Re: Use form instead of AuthType Basic (pop-up windows) >





 



Thank you for the infor=
mation.
I didnt know that what login and logout scripts were doing was setting/clea=
ring
the cookie.



Juan Manuel Parrilla





El 21 de enero de 2010 19:15, Ihnen, David < href=3D"mailto:dihnen@amazon.com">dihnen@amazon.com> escribi=F3: >







:auto'> style=3D'font-size:11.0pt;color:#1F497D'>I happen to have just finished deb=
ugging
my latest authen/authz cookie-based authentication module last night, so th=
is
is *really* fresh in my head.



:auto'> style=3D'font-size:11.0pt;color:#1F497D'> 



:auto'> style=3D'font-size:11.0pt;color:#1F497D'>So right now you’re using Au=
thType
basic.  Change that to something else specific to your module.  T=
he
basic auth will no longer respond.



:auto'> style=3D'font-size:11.0pt;color:#1F497D'> 



:auto'> style=3D'font-size:11.0pt;color:#1F497D'>Program an authentication handler =
(point
to with PerlAuthenHandler directive).  It returns Apache2::Const::DECL=
INED
if the ->auth_type doesn’t match your custom type.  Authen ha=
ndlers set
the ->user of the requestrec object (probably by reading and validating =
a
cookie in this case).  If authorization is required for the request an=
d
you didn’t set a username, you should probably return
Apache2::Const::FORBIDDEN.  If it succeeded or it doesn’t matter=
, you can
return Apache2::Const::OK;



:auto'> style=3D'font-size:11.0pt;color:#1F497D'> 



:auto'> style=3D'font-size:11.0pt;color:#1F497D'>Program an authorization handler.&=
nbsp;
(point to with PerlAuthzHandler directive).  This use the
Apache2::Access::requires method to get a list of your authentication
requirements from the auth config in apache’s config file (like Requi=
re
valid-user).  And Apache2::Access::satisfies to determine how you
 interpret the list of requirements.



:auto'> style=3D'font-size:11.0pt;color:#1F497D'> 



:auto'> style=3D'font-size:11.0pt;color:#1F497D'>If you want to use a straight logi=
n
page, If Authorization fails, set error header ‘Location’ to th=
e location of
your login script and return Apache2::Const::REDIRECT from the handler. an>



:auto'> style=3D'font-size:11.0pt;color:#1F497D'> 



:auto'> style=3D'font-size:11.0pt;color:#1F497D'>If you want to use an error docume=
nt, If
Authorization fails, return Apache2::Const::AUTH_REQUIRED or
Apache2::Const::FORBIDDEN from the handler.  (configure ErrorDocument =
401
or 403 respectively)



:auto'> style=3D'font-size:11.0pt;color:#1F497D'> 



:auto'> style=3D'font-size:11.0pt;color:#1F497D'>If authorization succeeds, simply =
return
Apache2::Const::OK.



:auto'> style=3D'font-size:11.0pt;color:#1F497D'> 



:auto'> style=3D'font-size:11.0pt;color:#1F497D'>I also have handlers functions for=
LOGIN
and LOGOUT which set and clear the auth cookie.  That’s differen=
t though –
Authen/Authz is the part where you decide if the user is recognized and is
allowed to access, which is what you asked about.



:auto'> style=3D'font-size:11.0pt;color:#1F497D'> 



:auto'> style=3D'font-size:11.0pt;color:#1F497D'>David



:auto'> style=3D'font-size:11.0pt;color:#1F497D'> 



:auto'> style=3D'font-size:11.0pt;color:#1F497D'> 



:auto'> style=3D'font-size:11.0pt;color:#1F497D'> 



in 0in 0in;
border-color:-moz-use-text-color -moz-use-text-color'>

:auto'> style=3D'font-size:10.0pt'>From: > Juan
Manuel Parrilla Guti=E9rrez [mailto: target=3D"_blank">joanmanel@gmail.com]

Sent: Thursday, January 21, 2010 9:26 AM

To: mod_perl list

Subject: Re: Use form instead of AuthType Basic (pop-up windows) an>





:auto'> 



>Hello,
I am sorry if I didnt explain me properly.

What I want to know is understand how use a formulary instead of AuthType B=
asic.
I know there are several modules that are doing this, but it is not about u=
sing
one, it is about understanding how.



I am doing my own Auth module (just to learn about it and mod_perl) and I w=
ould
like to use a form instead of pop up window, and using CGI is not an option
because I want to use Authz and Authen handlers.



What I need are the basic steps to move from AuthType Basic to use a form.<=
br>


Thank you very much for all your answers,

Juan Manuel Parrilla Gutierrez





:auto'>2010/1/21
Andr=E9 Warnier <aw@i=
ce-sa.com
>



:auto'>Juan
Manuel Parrilla Guti=E9rrez wrote:



>Hello,
this is my first message to this list and I am also a bit new to

mod_perl.

My question is simple, in all the documentation I have found about mod_perl=


and auth (like practical mod perl, or writing apache modules in perl and c)=


they are always using AuthType Basic, so when the users tries to acess some=


protected content, a pop up windows will appear to ask for name/pass.



What I want to do is to use a formulary instead of that pop-up window. As r>
far as I know looking at AuthCookie, for example, there they define

"AuthType Sample::AuthCookie" and they also define a href=3D"http://login.pl" target=3D"_blank">login.pl and different

configs in the conf files.



I want to know the different steps to define and use a form instead of

AuthType Basic.



>Have a
look here :

href=3D"http://cpan.uwinnipeg.ca/htdocs/Apache-AuthCookie/Ap ache2/AuthCooki=
e.html"
target=3D"_blank">http://cpan.uwinnipeg.ca/htdocs/Apache-Aut hCookie/Apache2=
/AuthCookie.html

and scroll to the section

THE LOGIN SCRIPT



If you install that module, it comes along with examples.

AAA is tricky, and maybe not the easiest way to start playing with mod_perl=
..
 But this documentation is well-done, and should get you started, if y=
ou
follow it carefully.





:auto'> 









 









--_000_0C4F9AE61E425F4F8C6912AF90E9A9E9C68265C7EXSEA19Bantam az_--